//
//  WebViewController.swift
//  SNS
//
//  Created by ios on 15/12/27.
//  Copyright © 2015年 WU. All rights reserved.
//

import UIKit

class WebViewController: UIViewController {
    
    //外部传入 urlString
    var urlString: String?
    
    let webView = UIWebView()
    
    override func loadView() {
        view = webView
    }
    override func viewDidLoad() {
        super.viewDidLoad()
        
        loadPage()
        // Do any additional setup after loading the view.
    }
    
    private func loadPage(){
        if let urlstr = urlString {
            let url = NSURL(string: urlstr)
            let request = NSURLRequest(URL: url!)
            webView.loadRequest(request)
        }
    }
    
    
    
}
